package com.yixing.tech.common.autoline.domain;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.List;

/**
 * 响应内容
 * 堆垛机与上层（我方）响应请求共用  同一结构响应内容
 * */
@JsonAutoDetect(getterVisibility=JsonAutoDetect.Visibility.NONE)
public class WCSResponse implements Serializable {

    @JsonProperty("RESULT")
    private Integer RESULT; // 成功标识 0成功 1失败
    @JsonProperty("MESSAGE")
    private String MESSAGE; // 信息
//    private List<ResponseData> DATA;    // 任务下发详情信息列表

    @JsonProperty("HIGJTSIGNAL")
    private Integer HIGJTSIGNAL; // 高度信号
    @JsonProperty("DATA")
    private Object DATA;

    public WCSResponse() {
    }

    public WCSResponse(Integer RESULT, String MESSAGE, Object DATA) {
        this.RESULT = RESULT;
        this.MESSAGE = MESSAGE;
        this.DATA = DATA;
    }

    public WCSResponse(Integer RESULT, String MESSAGE, Integer HIGJTSIGNAL, Object DATA) {
        this.RESULT = RESULT;
        this.MESSAGE = MESSAGE;
        this.HIGJTSIGNAL = HIGJTSIGNAL;
        this.DATA = DATA;
    }

    public Integer getRESULT() {
        return RESULT;
    }

    public void setRESULT(Integer RESULT) {
        this.RESULT = RESULT;
    }

    public String getMESSAGE() {
        return MESSAGE;
    }

    public void setMESSAGE(String MESSAGE) {
        this.MESSAGE = MESSAGE;
    }

    public Object getDATA() {
        return DATA;
    }

    public void setDATA(Object DATA) {
        this.DATA = DATA;
    }

    public Integer getHIGJTSIGNAL() {
        return HIGJTSIGNAL;
    }

    public void setHIGJTSIGNAL(Integer HIGJTSIGNAL) {
        this.HIGJTSIGNAL = HIGJTSIGNAL;
    }

    @Override
    public String toString() {
        return "WCSResponse{" +
                "RESULT=" + RESULT +
                ", MESSAGE='" + MESSAGE + '\'' +
                ", DATA=" + DATA +
                '}';
    }

    @JsonAutoDetect(getterVisibility=JsonAutoDetect.Visibility.NONE)
    public static class ResponseData implements Serializable {
        @JsonProperty("INSTRUCTION_CODE")
        private String INSTRUCTION_CODE;    // 任务编号
        @JsonProperty("SALVER_ID")
        private String SALVER_ID;           // 托盘号
        @JsonProperty("START_LOCATION")
        private String START_LOCATION;      // 起始位置
        @JsonProperty("END_LOCATION")
        private String END_LOCATION;        // 结束位置
        @JsonProperty("SUCCESS")
        private Integer SUCCESS;            // 是否成功: 0成功 1失败
        @JsonProperty("MSG")
        private String MSG;                 // 错误信息

        public String getINSTRUCTION_CODE() {
            return INSTRUCTION_CODE;
        }

        public void setINSTRUCTION_CODE(String INSTRUCTION_CODE) {
            this.INSTRUCTION_CODE = INSTRUCTION_CODE;
        }

        public String getSALVER_ID() {
            return SALVER_ID;
        }

        public void setSALVER_ID(String SALVER_ID) {
            this.SALVER_ID = SALVER_ID;
        }

        public String getSTART_LOCATION() {
            return START_LOCATION;
        }

        public void setSTART_LOCATION(String START_LOCATION) {
            this.START_LOCATION = START_LOCATION;
        }

        public String getEND_LOCATION() {
            return END_LOCATION;
        }

        public void setEND_LOCATION(String END_LOCATION) {
            this.END_LOCATION = END_LOCATION;
        }

        public Integer getSUCCESS() {
            return SUCCESS;
        }

        public void setSUCCESS(Integer SUCCESS) {
            this.SUCCESS = SUCCESS;
        }

        public String getMSG() {
            return MSG;
        }

        public void setMSG(String MSG) {
            this.MSG = MSG;
        }

        @Override
        public String toString() {
            return "ResponseData{" +
                    "INSTRUCTION_CODE='" + INSTRUCTION_CODE + '\'' +
                    ", SALVER_ID='" + SALVER_ID + '\'' +
                    ", START_LOCATION='" + START_LOCATION + '\'' +
                    ", END_LOCATION='" + END_LOCATION + '\'' +
                    ", SUCCESS=" + SUCCESS +
                    ", MSG='" + MSG + '\'' +
                    '}';
        }
    }

    @JsonAutoDetect(getterVisibility=JsonAutoDetect.Visibility.NONE)
    public static class TaskCancelRes implements Serializable {
        @JsonProperty("INSTRUCTION_CODE")
        private String INSTRUCTION_CODE;    // 任务编号
        @JsonProperty("SUCCESS")
        private Integer SUCCESS;            // 是否成功
        @JsonProperty("MSG")
        private String MSG;                 // 错误信息

        public TaskCancelRes() {
        }

        public TaskCancelRes(String INSTRUCTION_CODE, Integer SUCCESS, String MSG) {
            this.INSTRUCTION_CODE = INSTRUCTION_CODE;
            this.SUCCESS = SUCCESS;
            this.MSG = MSG;
        }

        public String getINSTRUCTION_CODE() {
            return INSTRUCTION_CODE;
        }

        public void setINSTRUCTION_CODE(String INSTRUCTION_CODE) {
            this.INSTRUCTION_CODE = INSTRUCTION_CODE;
        }

        public Integer getSUCCESS() {
            return SUCCESS;
        }

        public void setSUCCESS(Integer SUCCESS) {
            this.SUCCESS = SUCCESS;
        }

        public String getMSG() {
            return MSG;
        }

        public void setMSG(String MSG) {
            this.MSG = MSG;
        }

        @Override
        public String toString() {
            return "TaskCancelRes{" +
                    "INSTRUCTION_CODE='" + INSTRUCTION_CODE + '\'' +
                    ", SUCCESS=" + SUCCESS +
                    ", MSG='" + MSG + '\'' +
                    '}';
        }
    }
}
